package com.test.vote.pojo;

import java.io.Serializable;

/**
 * player
 * @author 
 */
public class Player implements Serializable {
    /**
     * 选手id
     */
    private Integer playerId;

    /**
     * 选手姓名
     */
    private String playerName;

    /**
     * 选手号
     */
    private String playerNumber;

    /**
     * 选手照片
     */
    private String playerImg;

    private Integer matchId;

    private static final long serialVersionUID = 1L;

    public Integer getPlayerId() {
        return playerId;
    }

    public void setPlayerId(Integer playerId) {
        this.playerId = playerId;
    }

    public String getPlayerName() {
        return playerName;
    }

    public void setPlayerName(String playerName) {
        this.playerName = playerName;
    }

    public String getPlayerNumber() {
        return playerNumber;
    }

    public void setPlayerNumber(String playerNumber) {
        this.playerNumber = playerNumber;
    }

    public String getPlayerImg() {
        return playerImg;
    }

    public void setPlayerImg(String playerImg) {
        this.playerImg = playerImg;
    }

    public Integer getMatchId() {
        return matchId;
    }

    public void setMatchId(Integer matchId) {
        this.matchId = matchId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Player other = (Player) that;
        return (this.getPlayerId() == null ? other.getPlayerId() == null : this.getPlayerId().equals(other.getPlayerId()))
            && (this.getPlayerName() == null ? other.getPlayerName() == null : this.getPlayerName().equals(other.getPlayerName()))
            && (this.getPlayerNumber() == null ? other.getPlayerNumber() == null : this.getPlayerNumber().equals(other.getPlayerNumber()))
            && (this.getPlayerImg() == null ? other.getPlayerImg() == null : this.getPlayerImg().equals(other.getPlayerImg()))
            && (this.getMatchId() == null ? other.getMatchId() == null : this.getMatchId().equals(other.getMatchId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPlayerId() == null) ? 0 : getPlayerId().hashCode());
        result = prime * result + ((getPlayerName() == null) ? 0 : getPlayerName().hashCode());
        result = prime * result + ((getPlayerNumber() == null) ? 0 : getPlayerNumber().hashCode());
        result = prime * result + ((getPlayerImg() == null) ? 0 : getPlayerImg().hashCode());
        result = prime * result + ((getMatchId() == null) ? 0 : getMatchId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", playerId=").append(playerId);
        sb.append(", playerName=").append(playerName);
        sb.append(", playerNumber=").append(playerNumber);
        sb.append(", playerImg=").append(playerImg);
        sb.append(", matchId=").append(matchId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}